package com.itrip.service.impl;


import com.itrip.dao.FlushOrderStatusMapper;
import com.itrip.service.FlushOrderStatusService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class FlushOrderStatusServiceImpl implements FlushOrderStatusService {
    @Resource
    private FlushOrderStatusMapper flushOrderStatusMapper;

    @Transactional
    @Override
    public int flushOrderStatusSum() {
        try {
            flushOrderStatusMapper.flushConSumStatus();
            flushOrderStatusMapper.flushSuccessStatus();
            return 1;
        }catch (Exception e){
            e.printStackTrace();
            return -1;
        }
    }

}
